Conversation
There was a problem hiding this comment.
This is the final PR Bugbot will review for you during this billing cycle
Your free Bugbot reviews will reset on January 10
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| McpError::internal_error(format!("Failed to parse state file: {e}"), Some(json!({"error": e.to_string()}))) | ||
| })?; | ||
| info!("Loaded workflow state from {:?}", state_file); | ||
| Ok(Some(state_data)) |
There was a problem hiding this comment.
Bug: State restoration passes wrapper object instead of inner state
The load_workflow_state function returns the entire persisted state wrapper object (containing last_step_id, last_step_index, state, and timestamp), but line 147 passes this directly as restored_state to the TypeScript workflow executor. The TypeScript workflow expects only the inner state field value, not the wrapper. This causes workflow resumption to fail because the TypeScript side receives incorrectly structured state data. The function should extract and return only state_data.get("state") instead of the full state_data object.
- Remove output_parser.rs (YAML-only JavaScript output parsing) - Remove workflow_format.rs (YAML vs TypeScript detection) - Remove serde_yaml dependency from mcp-agent and cli - Simplify server_sequence.rs to TypeScript-only execution - Preserve full MCP event streaming (WorkflowEvent, peer notifications) - Remove YAML example workflows - Update tests to remove YAML-specific test cases - CLI now only supports JSON workflow definitions TypeScript workflows continue to work with all MCP notification features including progress tracking, logging, and event streaming.
34d278c to
03f6c07
Compare
- Remove YAML workflow comments and test assertions - Simplify parse_workflow_content to remove duplicate strategies - Fix test module closing brace
Summary
This PR removes all legacy YAML workflow support, leaving only TypeScript workflows.
Breaking Changes
YAML workflows are no longer supported. Only TypeScript workflows are now supported.
What's Removed
server_sequence.rs)output_parser.rsmodule (YAML-specific JavaScript output parsing)workflow_format.rs(YAML vs TypeScript detection)serde_yamldependency from bothterminator-mcp-agentandterminator-cliexamples/*.yml)Why
TypeScript workflows use
context.datadirectly for structured output, making the JavaScript-basedoutput_parserunnecessary. This simplifies the codebase significantly:Migration
Convert YAML workflows to TypeScript format. See
examples/simple_notepad_workflow/for reference.Testing
cargo checkpassescargo test --package terminator-mcp-agent --libpasses (86 tests)Note
Remove all legacy YAML workflow support, making TypeScript the sole workflow format across CLI and MCP agent.
server_sequence.rs, dropworkflow_format.rsandoutput_parser.rs.execute_sequence; requireurland route toworkflow_typescript..ymlworkflows underexamples/.execute_javascript_with_nodejs(...)signature.serde_yamland YAML detection/paths; parsing now expects JSON only inparse_workflow_contentand help text.serde_yamlandunsafe-libyamlfrom workspace (Cargo.lock/Cargo.toml).Written by Cursor Bugbot for commit 3282760. This will update automatically on new commits. Configure here.